package ioc17;

import java.beans.PropertyEditorSupport;

public class AddressEditor extends PropertyEditorSupport {
    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        Address addr=new Address();

        String[] s=text.split("-");

        addr.setProvince(s[0]);
        addr.setCity(s[1]);

        setValue(addr);
    }

}
